<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title></title>
<link rel="stylesheet" type="text/css" href="..\bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="..\style.css">
<script type="text/javascript">
<!--
function SetFormDefaults()
{
//<!--#isp_ep-->

	document.form.i_e_bn.value = EXPO_BRIGHTNESS;
	document.form.i_e_agc.value = EXPO_ACG;
	document.form.i_e_as.value = EXPO_AS;
	
	document.form.i_e_anti[EXPO_ANTI].checked = true;


	document.form.i_e_antw.value = EXPO_ANTW;

	// shutter setting
	document.form.i_e_st.selectedIndex = EXPO_SHUTTER;
	SetShutterMode();
	if(EXPO_IRIS == 1)
		document.form.i_e_sm.value = EXPO_DC_MODE;
	else
		document.form.i_e_sm.value = EXPO_ST_MODE;
	document.form.i_e_sp.selectedIndex = EXPO_ST_SPEED;

	// Sens-up setting
	var type_Sensup = new Array("0FF", "X2", "X4", "X8", "X16", "X32", "X64");
	optionType = new Array(type_Sensup.length);
	for(i=0;i<type_Sensup.length-!EXPO_FPSHI;i++)
	{
		optionType[i] = document.createElement("option");
		optionType[i].value = i;
		optionType[i].text = type_Sensup[i];
		document.form.i_e_su.options.add(optionType[i], i);
	}
	document.form.i_e_su.selectedIndex = EXPO_SENSUP;
}

function SetShutterMode()
{
	switch(document.form.i_e_st.selectedIndex)
	{
		case 0:
			document.form.i_e_sm.disabled = false;
			document.form.i_e_sp.disabled = true;
			break;
		case 1:
			document.form.i_e_sm.disabled = true;
			document.form.i_e_sp.disabled = false;
			break;
		case 2:
			document.form.i_e_sm.disabled = true;
			document.form.i_e_sp.disabled = true;
			break;
	}

	var targetSM = document.getElementById("i_e_sm");
	for(i=targetSM.options.length;i>=0;i--){
		targetSM.options.remove(i);
	}
	if(EXPO_IRIS == 0)
	{
		var type_Auto = new Array("Normal", "Deblur");
	}
	else if(EXPO_IRIS == 1)
	{
		var type_Auto = new Array("Indoor", "Outdoor", "Deblur");
	}
	optionType = new Array(type_Auto.length);
	for(i=0;i<type_Auto.length;i++)
	{
		optionType[i] = document.createElement("option");
		optionType[i].value = i;
		optionType[i].text = type_Auto[i];
		document.form.i_e_sm.options.add(optionType[i], i);
	}

	var targetSP = document.getElementById("i_e_sp");
	for(i=targetSP.options.length;i>=0;i--){
		targetSP.options.remove(i);
	}
	if(EXPO_FPSHI == 1)
	{
		if(EXPO_SYSFREQ == 1)
			var type_Manual = new Array(    60, 120, 250, 500, 1000, 2000, 4000, 8000, 15000, 30000);
		else if(EXPO_SYSFREQ == 0)
			var type_Manual = new Array(    50, 100, 200, 400,  800, 1600, 3200, 6400, 12800, 25600);
	}
	else if(EXPO_FPSHI == 0)
	{
		if(EXPO_SYSFREQ == 1)
			var type_Manual = new Array(30, 60, 120, 250, 500, 1000, 2000, 4000, 8000, 15000, 30000);
		else if(EXPO_SYSFREQ == 0)
			var type_Manual = new Array(25, 50, 100, 200, 400,  800, 1600, 3200, 6400, 12800, 25600);
	}
	optionType = new Array(type_Manual.length);
	for(i=0;i<type_Manual.length;i++)
	{
		optionType[i] = document.createElement("option");
		optionType[i].value = i;
		optionType[i].text = "1/"+type_Manual[i];
		document.form.i_e_sp.options.add(optionType[i], i);
	}
}

function SetanntiMode()
{
	var anti_switch = document.form.i_e_anti[0].checked;
	document.form.i_e_antw.disabled = anti_switch;
}

//-->
</script>

</head>
<body onload="SetFormDefaults();">
<form id="form" name="form" method="get" action="appispmu.cgi">
	<div class="sub-title">
		<input class="btn btn-default pull-right" name="btOK" type="submit" value="submit">
		<h3>EXPOSURE</h3>
	</div>
	<hr>
	<div>
		<label class="sub-label">Brightness</label>
		<input name="i_e_bn" type="text"> [0~20]
	</div>
	<hr>
	<div>
		<label class="sub-label">ANTI-SAT</label>
		<label class="radio-inline"><input type="radio" name="i_e_anti" value=0 onchange=SetanntiMode()>OFF</label>
		<label class="radio-inline"><input type="radio" name="i_e_anti" value=1 onchange=SetanntiMode()>ON</label>
	</div>
	<div>
		<label class="sub-label">WEIGHT</label>
		<input name="i_e_antw" type="text"> [0~20]
	</div>
	
	<hr>
	<div>
		<label class="sub-label">Shutter</label>
		<select id="i_e_st" name="i_e_st" onchange="SetShutterMode()">
			<option value=0>Auto</option>
			<option value=1>Manual</option>
			<option value=2>Flicher</option>
		</select>
	</div>
	<div>
		<label class="sub-label">Mode</label>
		<select id="i_e_sm" name="i_e_sm">
		</select>
	</div>
	<div>
		<label class="sub-label">Speed</label>
		<select id="i_e_sp" name="i_e_sp">
		</select>
	</div>
	<hr>
	<div>
		<label class="sub-label">Sens-up</label>
		<select id="i_e_su" name="i_e_su">
		</select>
	</div>
	<hr>
	<div>
		<label class="sub-label">AGC</label>
		<input name="i_e_agc" type="text"> [0~255]
	</div>
	<hr>

		<div>
		<label class="sub-label">AE SPEED</label>
		<input name="i_e_as" type="text"> [0~20]
	</div>
</form>
</body>
</html>